﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Class="Wizard.Views.Wizard.ServerTypePage" 
    Title="Select Server Type"
    mc:Ignorable="d" d:DesignWidth="576.264" d:DesignHeight="309.663"
    >
    <Layout>
        <Zone ZonePlaceHolderName="Content">
            <StackPanel>

                <StackPanel.Resources>
                    <Style TargetType="{x:Type Button}">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Border x:Name="Outline" BorderBrush="#A0A0A0" Background="{DynamicResource NormalBrush}" BorderThickness="1" CornerRadius="5" Margin="6">
                                        <StackPanel Margin="2">
                                            <TextBlock Margin="2" FontWeight="Bold" Text="{TemplateBinding Content}" FontSize="13pt" Foreground="Navy" /> 
                                            <TextBlock Margin="2" Text="{TemplateBinding Tag}" FontSize="10pt" Foreground="Navy" />
                                        </StackPanel>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="Outline" Property="Background" Value="{DynamicResource MouseOverBrush}" />
                                        </Trigger>
                                        <Trigger Property="IsFocused" Value="True">
                                            <Setter TargetName="Outline" Property="Background" Value="{DynamicResource MouseOverBrush}" />
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </StackPanel.Resources>
                <Label Margin="0,3,0,3" Content="Please select the type of server to connect to."/>

                <Button Content="Exchange Server" Tag="Connect to a Microsoft Exchange server">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <NavigateControllerAction Controller="Wizard" Action="EditExchangeServerDetails">
                                <NavigateControllerAction.Parameters>
                                    <Parameter ParameterName="wizardState" Value="{Binding}" />
                                </NavigateControllerAction.Parameters>
                            </NavigateControllerAction>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>
            
                <Button Content="POP/SMTP Server" Tag="Connect to a POP3 and SMTP Server">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <NavigateControllerAction Controller="Wizard" Action="EditPopServerDetails">
                                <NavigateControllerAction.Parameters>
                                    <Parameter ParameterName="wizardState" Value="{Binding}" />
                                </NavigateControllerAction.Parameters>
                            </NavigateControllerAction>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>

            </StackPanel>
        </Zone>
    </Layout>
</Page>
